package com.implementsystem.prestacontas.timer;

import javax.ejb.EJB;
import javax.ejb.Schedule;
import javax.ejb.Stateless;
import javax.ejb.Timer;

@Stateless
public class Engine {
	
	@EJB
	GerenciaAtualizacoes ga;

	@SuppressWarnings("unused")
	@Schedule(second="*/10", minute="*", hour="*", dayOfWeek="*", dayOfMonth="*", month="*", year="*", info="MyTimer")
    private void scheduledTimeout(final Timer t) {
        
		try {
			System.out.println("Estou em Engine");
			ga.atualizar();
		} catch (Exception e) {
			System.out.println("erro");
			e.printStackTrace();
		}
		
    }
}